
import 'package:json_annotation/json_annotation.dart';

//定义生成的文件 flutter pub run build_runner build --delete-conflicting-outputs
part 'h5_upload_order.g.dart';

@JsonSerializable(explicitToJson: true)
class BeanH5UploadOrderTask{

   String? uuid;
   String? orderMsg;

   dynamic functionTypes;//功能类型
   dynamic orderType;//订单类型,零售,预售,赊销
   String? member;//会员名
   String? phone;//会员电话
   String? shoppingGuide;//导购
   String? cashier;//收银员
   dynamic orderStatus;//订单状态
   String? orderStatusName;//订单状态
   dynamic payStatus;//收银状态
   String? payStatusName;//收银状态


   dynamic typeCode;//传输类型编码 1新增 2支付 3取消 4整单退货
   String? fastOrderNo;  //离线订单号

   /*
    传输json：
    typeCode=1，新增时传原下单json；
    typeCode=2，支付时参数为 {
“fastOrderNo”:”订单编号”,”dgatheringId”:”收银行ID”
}
typeCode=3，取消时参数为空字符串””；
typeCode=4，整单退货时参数为空字符串””
     */
   dynamic pushJson;

   //提交版本号
   String? pushVersion;
   //提交客户端(checkstand智慧收银台,fast_checkstand智慧收银台(极速版),guide_ios 睿本云app苹果,guide_android 睿本云app安卓)|
   String? pushClient;


   bool synSuccess=false;//是否同步成功
   bool businessSuccess=false;//业务是否执行成功

   String? createDate;
   String? modifyDate;


   BeanH5UploadOrderTask(
       {this.uuid,
          this.orderMsg,
          this.functionTypes,
          this.orderType,
          this.member,
          this.phone,
          this.shoppingGuide,
          this.cashier,
          this.orderStatus,
          this.orderStatusName,
          this.payStatus,
          this.payStatusName,
          this.typeCode,
          this.fastOrderNo,
          this.pushJson,
          this.pushVersion,
          this.pushClient,
          this.synSuccess=false,
          this.businessSuccess=false,
          this.createDate,
          this.modifyDate
       }
       );

   //添加固定格式
   factory BeanH5UploadOrderTask.fromJson(Map<String, dynamic> json) => _$BeanH5UploadOrderTaskFromJson(json);
   Map<String, dynamic> toJson() => _$BeanH5UploadOrderTaskToJson(this);

}


@JsonSerializable(explicitToJson: true)
class BeanUploadOrderH5Response{

   String? code;
   String? msg;

   bool businessSuccess=false;
   String? orderId;
   String? fastOrderNo;


   BeanUploadOrderH5Response({
     this.code,
     this.msg,
     this.businessSuccess=false,
     this.orderId,
     this.fastOrderNo
}
);
   //添加固定格式
   factory BeanUploadOrderH5Response.fromJson(Map<String, dynamic> json) => _$BeanUploadOrderH5ResponseFromJson(json);
   Map<String, dynamic> toJson() => _$BeanUploadOrderH5ResponseToJson(this);

}


@JsonSerializable(explicitToJson: true)
class BeanUploadOrderH5Response2{

   String? code;
   String? msg;

   String? orderId;
   dynamic data;

   BeanUploadOrderH5Response2({
     this.code,
     this.msg,
     this.orderId,
     this.data
}
);
   //添加固定格式
   factory BeanUploadOrderH5Response2.fromJson(Map<String, dynamic> json) => _$BeanUploadOrderH5Response2FromJson(json);
   Map<String, dynamic> toJson() => _$BeanUploadOrderH5Response2ToJson(this);

}

@JsonSerializable(explicitToJson: true)
class BeanRetryUploadOrderH5Response{

   String? code;
   String? msg;

   bool retrySuccess;

   BeanRetryUploadOrderH5Response({
     this.code,
     this.msg,
     this.retrySuccess=false,
}
);
   //添加固定格式
   factory BeanRetryUploadOrderH5Response.fromJson(Map<String, dynamic> json) => _$BeanRetryUploadOrderH5ResponseFromJson(json);
   Map<String, dynamic> toJson() => _$BeanRetryUploadOrderH5ResponseToJson(this);

}


@JsonSerializable(explicitToJson: true)
class BeanH5RequestPageLocalOrder {

  int pageIndex=0;
  int pageSize=20;
  String? sword;


  BeanH5RequestPageLocalOrder(
      {
        this.pageIndex=0,
        this.pageSize=20,
        this.sword
      }
      );


  //添加固定格式
  factory BeanH5RequestPageLocalOrder.fromJson(Map<String, dynamic> json) => _$BeanH5RequestPageLocalOrderFromJson(json);
  Map<String, dynamic> toJson() => _$BeanH5RequestPageLocalOrderToJson(this);

}


@JsonSerializable(explicitToJson: true)
class BeanUploadOrderH5Response3{

   String? msg;
   String? code;
   int PageIndex=0;
   int PageCount=0;

   int totalCount=0;
   List<dynamic>? items;


   BeanUploadOrderH5Response3({this.msg, this.code, this.PageIndex=0,
     this.PageCount=0, this.totalCount=0, this.items});


   //添加固定格式
  factory BeanUploadOrderH5Response3.fromJson(Map<String, dynamic> json) => _$BeanUploadOrderH5Response3FromJson(json);
  Map<String, dynamic> toJson() => _$BeanUploadOrderH5Response3ToJson(this);

}


@JsonSerializable(explicitToJson: true)
class BeanUploadOrderH5Response4{

  String? msg;
  String? code;

  String? typeCode;
   String? fastOrderNo;


  BeanUploadOrderH5Response4(this.code, this.msg,  this.typeCode, this.fastOrderNo);

  factory BeanUploadOrderH5Response4.fromJson(Map<String, dynamic> json) => _$BeanUploadOrderH5Response4FromJson(json);
  Map<String, dynamic> toJson() => _$BeanUploadOrderH5Response4ToJson(this);

}
